from Tkinter import *

class mywidgets:
	def __init__(self,root):
		frame=Frame(root)
		frame.pack()
		self.txtfr(frame)
		return

	def txtfr(self,frame):
		
		#define a new frame and put a text area in it
		textfr=Frame(frame)
		self.text=Text(textfr,height=10,width=50,background='white')
		
		# put a scroll bar in the frame
		scroll=Scrollbar(textfr)
		self.text.configure(yscrollcommand=scroll.set)
		
		#pack everything
		self.text.pack(side=LEFT)
		scroll.pack(side=RIGHT,fill=Y)
		textfr.pack(side=TOP)
		return

def main():
	root = Tk()
	s=mywidgets(root)
	root.title('textarea')
	root.mainloop()
	
main()


#
#
##!/usr/bin/env python  
#
#from Tkinter import *  
#
#
#
#
#class InstallerGUI(Frame):  
#	def __init__(self, master=None):  
#		Frame.__init__(self, master)  
#		self.grid()  
#		self.createWidgets()  
#
#	def createWidgets(self):  
#		self.installButton = Button(self)  
#		self.installButton['text'] = 'Install the latest version'  
#		self.installButton['anchor'] = 'nw'  
#		self.installButton['width'] = 35  
#		self.installButton['command'] = self.quit  
#		self.installButton.pack(side=LEFT)  
#		self.installButton.bind("<Button-1>", self.installButton_Click)  
#
#		self.revertButton = Button(self)  
#		self.revertButton['text'] = 'Revert to a previous installation'  
#		self.revertButton['anchor'] = 'nw'  
#		self.revertButton['width'] = 35  
#		self.revertButton['command'] = self.quit  
#		self.revertButton.pack(side=LEFT)  
#		self.revertButton.bind("<Button-1>", self.revertButton_Click)  
#		
#		self.helpButton = Button(self)  
#		self.helpButton['text'] = 'Help'  
#		self.helpButton['anchor'] = 'nw'  
#		self.helpButton['width'] = 35  
#		self.helpButton['command'] = self.quit  
#		self.helpButton.pack(side=LEFT)  
#		self.helpButton.bind("<Button-1>", self.helpButton_Click)  
#
#		self.quitButton = Button(self)  
#		self.quitButton['text'] = 'Quit'  
#		self.quitButton['anchor'] = 'nw'  
#		self.quitButton['width'] = 35  
#		self.quitButton['command'] = self.quit  
#		self.quitButton.pack(side=LEFT)  
#
#	def installButton_Click(self, event):  
#		pass  
#
#	def revertButton_Click(self, event):  
#		pass  
#
#	def helpButton_Click(self, event):  
#		pass  
#	
#app = InstallerGUI()  
#app.master.title("MyWickedApp")  
#app.mainloop()  